<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/system/tags" prefix="system"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<form action="${ctxPathA}/system/sensitivewordset/addOrUpdate" method="post" autocomplete="off" class="show-info" style="height: 240px;">
	<shield:token/>
    <input id="id" name="id" type="hidden" maxlength="100" value="${model.id }">
    <table class="tab-show">
    	<colgroup>
    		<col width="25%">
    		<col width="">
    	</colgroup>
    	<tr>
	    	<th>
            	<label><font color="red">*</font>字典库：</label>
        	</th>
         	<td><select name="dict" style="max-width: 220px;">
 	<c:forEach var="model" items="${dicts_ext }">
					<option value="${model.fileName }">${model.fileName }</option>
	</c:forEach>
				</select>
         	</td>
		</tr>
        <tr>
	    	<th>
            	<label><font color="red">*</font>敏感词：</label>
        	</th>
         	<td><input type="text" name="word" value="${model.word}"></td>
		</tr>
		<tr>
	    	<th>
            	<label><font color="red">*</font>类型：</label>
        	</th>
         	<td>
				<!--选择“通过”时显示id为dealBySpider的元素，选择“退回”时显示id为yaunyinSpider的元素-->
         		<select name="type" data-v="${model.type }" class="shieldSelectRelated">
         			<option value="0">禁用</option>
         			<option value="1" relatedTo="#SensitiveReplaceWord">替换</option>
         			<option value="-1">移除</option>
         		</select>
         	</td>
		</tr>
		<tr id="SensitiveReplaceWord">
	    	<th>
            	<label><font color="red">*</font>替换为：</label>
        	</th>
         	<td><input type="text" name="replaceWord" value="${model.replaceWord}"></td>
		</tr>
<c:if test="${not empty model }">
		<tr>
	    	<th>
            	<label>状态：</label>
        	</th>
         	<td><shield:switchOput data="-1=删除|正常" value="${model.state}"></shield:switchOput></td>
		</tr>
</c:if>
    </table>
    <div class="taCenter">
		<input class="button" type="submit" value="提交"/>
    	<input class="button default" type="reset" value="重置"/>
    </div>
    <div class="mt10">
		<span class="tips"> 注：内置库不可添加词条，只有扩展库可以添加！</span>
    </div>
</form>
</shield:permssion>